package com.yuanfeng.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuanfeng.business.entity.ShopSelfCatEntity;
import com.yuanfeng.commoms.vo.shop.ManageShopSelfCatMenuVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName ShopSelfCatMapper
 * @Description  店铺商品分类表
 * @Author cyp
 * @Date 2023-06-13 10:16:07
 * @Version 1.0
 **/
@Mapper
public interface ShopSelfCatMapper extends BaseMapper<ShopSelfCatEntity> {

    /**
     * 查询店铺分类
     * @param shopId
     * @return
     */
    List<ManageShopSelfCatMenuVO> selectByShopId(Integer shopId);

    /**
     * 删除分类
     * @param shopGoodsCatIds
     */
    void deleteBatch(@Param("shopGoodsCatIds")List<Integer> shopGoodsCatIds);

    /**
     * 删除子分类
     * @param shopGoodsCatIds
     */
    void deleteZiBatch(@Param("shopGoodsCatIds")List<Integer> shopGoodsCatIds);

    /**
     * 查询店铺自定义的分类
     * @param shopGoodsCatId
     * @return
     */
    ManageShopSelfCatMenuVO selectByPrimaryKey(Integer shopGoodsCatId);


    List<ManageShopSelfCatMenuVO> selectByCaId(@Param("catIds") List<ManageShopSelfCatMenuVO> catIds);


    ManageShopSelfCatMenuVO queryCatIdByParent(@Param("parentId") Integer parentId);
}
